package io.renren.common.result;

/**
 * @author Luo Sheng
 * @school YiBin university
 * @create 2023-02-22 10:42
 */

import lombok.Getter;

/**
 * 10：系统错误
 * 11：remote远端调用模块错误
 * 12：model模块校验错误
 * 13：admin模块错误
 * 14：medical模块错误
 * 统一返回结果状态信息类
 *
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(0, "成功"),
    FAIL(500, "失败"),
    //    10：系统错误
    SERVICE_UNKNOWN_ERROR(10001, "服务器未知异常"),
    //    11：remote远端调用模块错误
    LOCAL_CALL_ERROR(11001,"本地调用python脚本出错"),
    REMOTE_CALL_ERROR(11002,"远程调用python脚本出错"),
    THREAD_POOL_ERROR(11003,"线程池调用线程失败"),
    //    12：model模块校验错误
    MODEL_INVALID_ERROR(12001, "模块数据校验错误"),
    //    13：admin模块错误
    TOKEN_GENERATOR_ERROR(13001, "生成token失败"),
    //    14：medical模块错误
    TOKEN_CHECK_ERROR(14001, "token失效"),
    HEALTH_GUIDANCE_ERROR(14002, "健康指导模块异常"),
    NAME_REPETITION_ERROR(14003, "病情名称重复"),
    FILE_SIZE_ERROR(14004, "请上传50MB以内的文件"),
    USER_NOTEXIT_ERROR(14005, "找不到该用户微信信息"),
    SID_ERROR(14006, "sid出错"),
    NOT_FIND_ERROR(14007, "没找到对象错误"),
    INFORMATION_INSERT_ERROR(14008, "病人信息插入出错"),
    FEIGN_CALL_ERROR(14009, "远程调用异常"),
    UPDATE_RECORD_ERROR(14010, "更新随访记录异常"),
    DELETED_STEP_ERROR(14011, "删除随访阶段记录异常"),
    PUBLISH_TIME_ERROR(14012, "教育发布时间异常"),
    PATIENT_SUB_REPETITION(14013, "病人已有该病情分类"),
    CANT_SAVE_DISEASEINFO(14014, "无法为该患者添加疾病信息"),
    CANT_UPDATE_STATUS(14015, "无法更新状态"),
    MESSAGE_SAVE_ERROR(14016, "消息保存或发送失败");
    ;


    private Integer code;

    private String message;

     ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}